var isNeedReload=false;

function ViewComboBox(ID,Name,Type)
{	
	if(Type == "Date")
	{
		fPopUpCalendarDlg(Name,Type);
	}
	else if(Type == "DateTime")
	{
		fPopUpCalendarDlg(Name,Type);
	}
}

function fPopUpDlg(sURL,PropertyName,WINname,WINwidth,WINheight)
{
	showx = event.screenX - event.offsetX - 104;
	showy = event.screenY - event.offsetY + 18;
	var retval;
	retval = window.showModalDialog("" + sURL + "", "", "dialogWidth:" + WINwidth + "px; dialogHeight:" + WINheight + "px; dialogLeft:" + showx + "px; dialogTop:" + showy + "px; status:no; directories:yes; scrollbars:no; Resizable=no; help: no;");
	if( retval != null )
	{
		document.all.item(PropertyName).value = retval;
	}
}

function fPopUpCalendarDlg(PropertyName,Type)
{
	showx = event.screenX - event.offsetX -104;//- 4 - 210 ; // + deltaX;
	showy = event.screenY - event.offsetY +18;//+ 18; // + deltaY;
	newWINwidth = 210 + 4 + 18;
	var retval;
	if(Type == "Date")
	{
	retval = window.showModalDialog("../AdminJS/calender/kalendar_d.htm", "", "dialogWidth:194px; dialogHeight:194px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes; scrollbars:no; Resizable=no; help: no;");
	}
	else if(Type == "DateTime")
	{
	retval = window.showModalDialog("../AdminJS/calender/kalendar_s.htm", "", "dialogWidth:194px; dialogHeight:208px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes; scrollbars:no; Resizable=no; help: no;");
	}
	if( retval != null )
	{
		document.all.item(PropertyName).value = retval;
	}
}
